<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;

$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
$return['basic']=$this->plugin_setting('basic');
$return['banner']=$return['basic']['hdps'];
set_html('title','攻略详情');
if($_RQ['op']=='main'){
	/*******main*******/
	//攻略
	$id=$_RQ['id'];
	$info=pdo_get('jy_tour_strategy',array('uniacid'=>$_SESSION['uniacid'],'id'=>$id));
	if($info){
		
		$info['destination_pcd']=json_decode($info['destination_pcd'],true);
		$info['createtime']=date('Y-m-d',$info['createtime']);
	}
	$articlelist=pdo_getall('jy_tour_strategy',array('uniacid'=>$_SESSION['uniacid'],'status'=>'1'),'','','looks desc limit 3');
	//推荐路线
	$recommends=pdo_getall('jy_tour_way',array('uniacid'=>$_SESSION['uniacid'],'status'=>'1'),'','','createtime desc limit 2');
	if($recommends){
		foreach($recommends as &$recommend){
			$images=json_decode($recommend['images'],true);
			$recommend['image']=$images['0'];
		}
	}
	$return['articlelist']=$articlelist;
	$return['recommends']=$recommends;
	$return['info']=$info;
	//print_r($hotlist);exit;
	exi($return);
}